using Boo.Lang;
using System;
using System.Collections;
using System.Collections.Generic;
using System.Runtime.CompilerServices;
using UnityEngine;
using UnityScript.Lang;

[Serializable]
public class regionaltournament : MonoBehaviour
{
	[Serializable]
	[CompilerGenerated]
	internal sealed class _0024OnLevelWasLoaded_0024439 : GenericGenerator<WaitForSeconds>
	{
		internal regionaltournament _0024self__0024441;

		public _0024OnLevelWasLoaded_0024439(regionaltournament self_)
		{
			_0024self__0024441 = self_;
		}

		public override IEnumerator<WaitForSeconds> GetEnumerator()
		{
			return new _0024(_0024self__0024441);
		}
	}

	[Serializable]
	[CompilerGenerated]
	internal sealed class _0024del_0024442 : GenericGenerator<WaitForSeconds>
	{
		internal regionaltournament _0024self__0024444;

		public _0024del_0024442(regionaltournament self_)
		{
			_0024self__0024444 = self_;
		}

		public override IEnumerator<WaitForSeconds> GetEnumerator()
		{
			return new _0024(_0024self__0024444);
		}
	}

	public string baselevel;

	public string opponent;

	public bool won;

	public GameObject[] arenas;

	public GameObject gold;

	public GameObject[] beys;

	public bool roundplaying;

	[NonSerialized]
	public static int arena;

	public int state;

	public loadarenastadium tmp;

	public RaycastHit hit;

	public string b2;

	public string b3;

	public string b4;

	public string b5;

	public string b6;

	public string b7;

	public string b8;

	public string rt;

	public string nextcareer;

	public string previouscareer;

	public regionaltournament()
	{
		baselevel = string.Empty;
		opponent = string.Empty;
		b2 = "b2r1";
		b3 = "b3r1";
		b4 = "b4r1";
		b5 = "b5r1";
		b6 = "b6r1";
		b7 = "b7r1";
		b8 = "b8r1";
		rt = "rt1";
		nextcareer = string.Empty;
		previouscareer = string.Empty;
	}

	public void Awake()
	{
		CheckLevel();
	}

	public void CheckLevel()
	{
		UnityEngine.Object.DontDestroyOnLoad(gameObject);
		if (UnityEngine.SceneManagement.SceneManager.GetActiveScene().name == "career2")
		{
			baselevel = "career2";
			nextcareer = "career";
			previouscareer = "career3";
			b2 = "b2r1";
			b3 = "b3r1";
			b4 = "b4r1";
			b5 = "b5r1";
			b6 = "b6r1";
			b7 = "b7r1";
			b8 = "b8r1";
			rt = "rt1";
		}
		if (UnityEngine.SceneManagement.SceneManager.GetActiveScene().name == "career4")
		{
			baselevel = "career4";
			nextcareer = "career3";
			previouscareer = "career2";
			b2 = "b2r2";
			b3 = "b3r2";
			b4 = "b4r2";
			b5 = "b5r2";
			b6 = "b6r2";
			b7 = "b7r2";
			b8 = "b8r2";
			rt = "rt2";
		}
	}

	public IEnumerator OnLevelWasLoaded()
	{
		return new _0024OnLevelWasLoaded_0024439(this).GetEnumerator();
	}

	public IEnumerator del()
	{
		return new _0024del_0024442(this).GetEnumerator();
	}

	public void roundplay()
	{
		roundplaying = true;
	}

	public void stadiumload()
	{
		if (!roundplaying)
		{
			arena = UnityEngine.Random.Range(0, Extensions.get_length((System.Array)arenas));
			roundplay();
			state = 1;
		}
		arenas[arena].SetActive(value: true);
		for (int i = 0; i < arenas[arena].transform.childCount; i++)
		{
			arenas[arena].transform.GetChild(i).gameObject.SetActive(value: true);
		}
	}

	public void Main()
	{
	}
}
